﻿#pragma once  
#include "ui_user_admin.h"
#include <QMainWindow>
#include "LoginSystem.h"
#include "Global_Class.h"
#include "UndoRedo_User.h"

class user_admin : public QMainWindow
{
	Q_OBJECT


public:
	void refershAUtable(std::deque<users> usersQueue); // Refresh the user list or data
	user_admin(QWidget* parent = nullptr);
	~user_admin();
	void SetupAUToolBar();
	void AddUser();
	void DeleteUser();
	void ViewUser();
	void ModifyUser();
	void SearchUser();
	void RefreshPassword();
	void showDeleteSuccessMessage(int count);
	void updateTableRow(QTableWidget* table, int row, const users& user);
	void showErrorMessage(const QString& title, const QString& message);
	void showSuccessMessage(const QString& title, const QString& message);

private:
	Ui::user_admin ui; // Uncomment if you have a UI file for admin_user
	UndoRedo undoRedo;
};